//package com.zws.cucumber.wiremock;
//
//import com.github.tomakehurst.wiremock.WireMockServer;
//import com.github.tomakehurst.wiremock.admin.model.*;
//import com.github.tomakehurst.wiremock.client.CountMatchingStrategy;
//import com.github.tomakehurst.wiremock.client.MappingBuilder;
//import com.github.tomakehurst.wiremock.common.FileSource;
//import com.github.tomakehurst.wiremock.common.Notifier;
//import com.github.tomakehurst.wiremock.common.ProxySettings;
//import com.github.tomakehurst.wiremock.core.Options;
//import com.github.tomakehurst.wiremock.global.GlobalSettings;
//import com.github.tomakehurst.wiremock.global.GlobalSettingsHolder;
//import com.github.tomakehurst.wiremock.http.RequestListener;
//import com.github.tomakehurst.wiremock.matching.RequestPattern;
//import com.github.tomakehurst.wiremock.matching.RequestPatternBuilder;
//import com.github.tomakehurst.wiremock.matching.StringValuePattern;
//import com.github.tomakehurst.wiremock.recording.RecordSpec;
//import com.github.tomakehurst.wiremock.recording.RecordSpecBuilder;
//import com.github.tomakehurst.wiremock.recording.RecordingStatusResult;
//import com.github.tomakehurst.wiremock.recording.SnapshotRecordResult;
//import com.github.tomakehurst.wiremock.standalone.MappingsLoader;
//import com.github.tomakehurst.wiremock.stubbing.ServeEvent;
//import com.github.tomakehurst.wiremock.stubbing.StubImport;
//import com.github.tomakehurst.wiremock.stubbing.StubMapping;
//import com.github.tomakehurst.wiremock.verification.*;
//
//import java.util.List;
//import java.util.UUID;
//import java.util.concurrent.TimeUnit;
//
//public class ZwsWiremockServerProxy extends WireMockServer {
//    private volatile WireMockServer puppet;
//
//    public void setPuppet(WireMockServer puppet) {
//        this.puppet = puppet;
//    }
//
//    private WireMockServer puppet() {
//        while (puppet == null) {
//            try {
//                System.out.println("rawWireMockServer is null, retrying...");
//                TimeUnit.MILLISECONDS.sleep(250);
//            } catch (InterruptedException e) {
//                Thread.currentThread().interrupt();
//                throw new IllegalStateException("Thread interrupted while waiting for rawWireMockServer to be set", e);
//            }
//        }
//        return puppet;
//    }
//
//    public ZwsWiremockServerProxy(Options options) {
//
//    }
//
//    public ZwsWiremockServerProxy(int port, Integer httpsPort, FileSource fileSource, boolean enableBrowserProxying, ProxySettings proxySettings, Notifier notifier) {
//    }
//
//    public ZwsWiremockServerProxy(int port, FileSource fileSource, boolean enableBrowserProxying, ProxySettings proxySettings) {
//    }
//
//    public ZwsWiremockServerProxy(int port, FileSource fileSource, boolean enableBrowserProxying) {
//    }
//
//    public ZwsWiremockServerProxy(int port) {
//    }
//
//    public ZwsWiremockServerProxy(int port, Integer httpsPort) {
//    }
//
//    public ZwsWiremockServerProxy() {
//    }
//
//    @Override
//    public void loadMappingsUsing(MappingsLoader mappingsLoader) {
//        puppet().loadMappingsUsing(mappingsLoader);
//    }
//
//    @Override
//    public GlobalSettingsHolder getGlobalSettingsHolder() {
//        return puppet().getGlobalSettingsHolder();
//    }
//
//    @Override
//    public void addMockServiceRequestListener(RequestListener listener) {
//        puppet().addMockServiceRequestListener(listener);
//    }
//
//    @Override
//    public void enableRecordMappings(FileSource mappingsFileSource, FileSource filesFileSource) {
//        puppet().enableRecordMappings(mappingsFileSource, filesFileSource);
//    }
//
//    @Override
//    public void stop() {
//        puppet().stop();
//    }
//
//    @Override
//    public void start() {
//        puppet().start();
//    }
//
//    @Override
//    public void shutdown() {
//        puppet().shutdown();
//    }
//
//    @Override
//    public boolean isHttpEnabled() {
//        return puppet().isHttpEnabled();
//    }
//
//    @Override
//    public boolean isHttpsEnabled() {
//        return puppet().isHttpsEnabled();
//    }
//
//    @Override
//    public int port() {
//        return puppet().port();
//    }
//
//    @Override
//    public int httpsPort() {
//        return puppet().httpsPort();
//    }
//
//    @Override
//    public String url(String path) {
//        return puppet().url(path);
//    }
//
//    @Override
//    public String baseUrl() {
//        return puppet().baseUrl();
//    }
//
//    @Override
//    public boolean isRunning() {
//        return puppet().isRunning();
//    }
//
//    @Override
//    public StubMapping givenThat(MappingBuilder mappingBuilder) {
//        return puppet().givenThat(mappingBuilder);
//    }
//
//    @Override
//    public StubMapping stubFor(MappingBuilder mappingBuilder) {
//        return puppet().stubFor(mappingBuilder);
//    }
//
//    @Override
//    public void editStub(MappingBuilder mappingBuilder) {
//        puppet().editStub(mappingBuilder);
//    }
//
//    @Override
//    public void removeStub(MappingBuilder mappingBuilder) {
//        puppet().removeStub(mappingBuilder);
//    }
//
//    @Override
//    public void removeStub(StubMapping stubMapping) {
//        puppet().removeStub(stubMapping);
//    }
//
//    @Override
//    public List<StubMapping> getStubMappings() {
//        return puppet().getStubMappings();
//    }
//
//    @Override
//    public StubMapping getSingleStubMapping(UUID id) {
//        return puppet().getSingleStubMapping(id);
//    }
//
//    @Override
//    public List<StubMapping> findStubMappingsByMetadata(StringValuePattern pattern) {
//        return puppet().findStubMappingsByMetadata(pattern);
//    }
//
//    @Override
//    public void removeStubMappingsByMetadata(StringValuePattern pattern) {
//        puppet().removeStubMappingsByMetadata(pattern);
//    }
//
//    @Override
//    public void removeStubMapping(StubMapping stubMapping) {
//        puppet().removeStubMapping(stubMapping);
//    }
//
//    @Override
//    public void verify(RequestPatternBuilder requestPatternBuilder) {
//        puppet().verify(requestPatternBuilder);
//    }
//
//    @Override
//    public void verify(int count, RequestPatternBuilder requestPatternBuilder) {
//        puppet().verify(count, requestPatternBuilder);
//    }
//
//    @Override
//    public void verify(CountMatchingStrategy countMatchingStrategy, RequestPatternBuilder requestPatternBuilder) {
//        puppet().verify(countMatchingStrategy, requestPatternBuilder);
//    }
//
//    @Override
//    public List<LoggedRequest> findAll(RequestPatternBuilder requestPatternBuilder) {
//        return puppet().findAll(requestPatternBuilder);
//    }
//
//    @Override
//    public List<ServeEvent> getAllServeEvents() {
//        return puppet().getAllServeEvents();
//    }
//
//    @Override
//    public void setGlobalFixedDelay(int milliseconds) {
//        puppet().setGlobalFixedDelay(milliseconds);
//    }
//
//    @Override
//    public List<LoggedRequest> findAllUnmatchedRequests() {
//        return puppet().findAllUnmatchedRequests();
//    }
//
//    @Override
//    public List<NearMiss> findNearMissesForAllUnmatchedRequests() {
//        return puppet().findNearMissesForAllUnmatchedRequests();
//    }
//
//    @Override
//    public List<NearMiss> findAllNearMissesFor(RequestPatternBuilder requestPatternBuilder) {
//        return puppet().findAllNearMissesFor(requestPatternBuilder);
//    }
//
//    @Override
//    public List<NearMiss> findNearMissesFor(LoggedRequest loggedRequest) {
//        return puppet().findNearMissesFor(loggedRequest);
//    }
//
//    @Override
//    public void addStubMapping(StubMapping stubMapping) {
//        puppet().addStubMapping(stubMapping);
//    }
//
//    @Override
//    public void editStubMapping(StubMapping stubMapping) {
//        puppet().editStubMapping(stubMapping);
//    }
//
//    @Override
//    public ListStubMappingsResult listAllStubMappings() {
//        return puppet().listAllStubMappings();
//    }
//
//    @Override
//    public SingleStubMappingResult getStubMapping(UUID id) {
//        return puppet().getStubMapping(id);
//    }
//
//    @Override
//    public void saveMappings() {
//        puppet().saveMappings();
//    }
//
//    @Override
//    public void resetAll() {
//        puppet().resetAll();
//    }
//
//    @Override
//    public void resetRequests() {
//        puppet().resetRequests();
//    }
//
//    @Override
//    public void resetToDefaultMappings() {
//        puppet().resetToDefaultMappings();
//    }
//
//    @Override
//    public GetServeEventsResult getServeEvents() {
//        return puppet().getServeEvents();
//    }
//
//    @Override
//    public SingleServedStubResult getServedStub(UUID id) {
//        return puppet().getServedStub(id);
//    }
//
//    @Override
//    public void resetScenarios() {
//        puppet().resetScenarios();
//    }
//
//    @Override
//    public void resetMappings() {
//        puppet().resetMappings();
//    }
//
//    @Override
//    public VerificationResult countRequestsMatching(RequestPattern requestPattern) {
//        return puppet().countRequestsMatching(requestPattern);
//    }
//
//    @Override
//    public FindRequestsResult findRequestsMatching(RequestPattern requestPattern) {
//        return puppet().findRequestsMatching(requestPattern);
//    }
//
//    @Override
//    public FindRequestsResult findUnmatchedRequests() {
//        return puppet().findUnmatchedRequests();
//    }
//
//    @Override
//    public void removeServeEvent(UUID eventId) {
//        puppet().removeServeEvent(eventId);
//    }
//
//    @Override
//    public FindServeEventsResult removeServeEventsMatching(RequestPattern requestPattern) {
//        return puppet().removeServeEventsMatching(requestPattern);
//    }
//
//    @Override
//    public FindServeEventsResult removeServeEventsForStubsMatchingMetadata(StringValuePattern metadataPattern) {
//        return puppet().removeServeEventsForStubsMatchingMetadata(metadataPattern);
//    }
//
//    @Override
//    public void updateGlobalSettings(GlobalSettings newSettings) {
//        puppet().updateGlobalSettings(newSettings);
//    }
//
//    @Override
//    public FindNearMissesResult findNearMissesForUnmatchedRequests() {
//        return puppet().findNearMissesForUnmatchedRequests();
//    }
//
//    @Override
//    public GetScenariosResult getAllScenarios() {
//        return puppet().getAllScenarios();
//    }
//
//    @Override
//    public FindNearMissesResult findTopNearMissesFor(LoggedRequest loggedRequest) {
//        return puppet().findTopNearMissesFor(loggedRequest);
//    }
//
//    @Override
//    public FindNearMissesResult findTopNearMissesFor(RequestPattern requestPattern) {
//        return puppet().findTopNearMissesFor(requestPattern);
//    }
//
//    @Override
//    public void startRecording(String targetBaseUrl) {
//        puppet().startRecording(targetBaseUrl);
//    }
//
//    @Override
//    public void startRecording(RecordSpec spec) {
//        puppet().startRecording(spec);
//    }
//
//    @Override
//    public void startRecording(RecordSpecBuilder recordSpec) {
//        puppet().startRecording(recordSpec);
//    }
//
//    @Override
//    public SnapshotRecordResult stopRecording() {
//        return puppet().stopRecording();
//    }
//
//    @Override
//    public RecordingStatusResult getRecordingStatus() {
//        return puppet().getRecordingStatus();
//    }
//
//    @Override
//    public SnapshotRecordResult snapshotRecord() {
//        return puppet().snapshotRecord();
//    }
//
//    @Override
//    public SnapshotRecordResult snapshotRecord(RecordSpecBuilder spec) {
//        return puppet().snapshotRecord(spec);
//    }
//
//    @Override
//    public SnapshotRecordResult snapshotRecord(RecordSpec spec) {
//        return puppet().snapshotRecord(spec);
//    }
//
//    @Override
//    public Options getOptions() {
//        return puppet().getOptions();
//    }
//
//    @Override
//    public void shutdownServer() {
//        puppet().shutdownServer();
//    }
//
//    @Override
//    public ListStubMappingsResult findAllStubsByMetadata(StringValuePattern pattern) {
//        return puppet().findAllStubsByMetadata(pattern);
//    }
//
//    @Override
//    public void removeStubsByMetadata(StringValuePattern pattern) {
//        puppet().removeStubsByMetadata(pattern);
//    }
//
//    @Override
//    public void importStubs(StubImport stubImport) {
//        puppet().importStubs(stubImport);
//    }
//
//    @Override
//    public GetGlobalSettingsResult getGlobalSettings() {
//        return puppet().getGlobalSettings();
//    }
//
//    @Override
//    public void checkForUnmatchedRequests() {
//        puppet().checkForUnmatchedRequests();
//    }
//}